{% extends "base.html" %}

{% block title %}
    {{ perm.per_name }}-关联职位
{% endblock %}

{% block head %}
    <h1 class="page-header">{{ perm.per_name }}-关联职位</h1>
{% endblock %}

{% block content %}
    <div class="col-lg-12">
        <form method="post" action="">
            <input type="hidden" value="{{ csrf_token() }}" name="csrf_token">
            <table class="table">
                <thead>
                <tr>
                    <th>选择</th>
                    <th>职位名称</th>
                    <th>职位部门</th>
                </tr>
                </thead>
                <tbody>
                {% for pos in pos_list %}
                <tr>
                    <td>
                        <input type="checkbox"
                               {% if pos in perm.p_position %} checked {% endif %}
                               name="position_ids"
                               value="{{ pos.id }}">
                    </td>
                    <td>{{ pos.p_name }}</td>
                    <td>{{ pos.p_depart.d_name }}</td>
                </tr>
                {% endfor %}

                </tbody>
            </table>
            <button class="btn btn-primary btn-block">提交</button>
        </form>
    </div>
{% endblock %}